
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Java利用Deepseek进行项目代码审查 - 学习卡片</title>
      <style>
        body { font-family: sans-serif; background-color: #f0f8ff; color: #333; display: flex; flex-direction: column; align-items: center; padding: 50px 20px; }
        .header h1 { font-size: 32px; }
        .grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; width: 100%; max-width: 1200px; }
        .card-container { perspective: 1200px; cursor: pointer; height: 250px; }
        .card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.7s; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
        .card-container.flipped .card { transform: rotateY(180deg); }
        .card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; box-sizing: border-box; border-radius: 16px; background-color: #fff; padding: 24px; }
        .card-back { background-color: #f0fff4; transform: rotateY(180deg); justify-content: space-between; }
        .card-category { font-size: 14px; color: #0052d9; margin-bottom: 8px; font-weight: 500; }
        .card-question { font-size: 20px; font-weight: 500; flex-grow: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
        .card-answer-wrapper { flex-grow: 1; overflow-y: auto; }
        .card-answer { font-size: 15px; line-height: 1.7; }
        .card-footer { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 16px; margin-top: 16px; }
        .card-source { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 12px; margin-top: 12px; }
      </style>
    </head>
    <body>
      <div class="header">
        <h1>Java利用Deepseek进行项目代码审查 - 学习卡片</h1>
      </div>
      <div class="grid-container">
        
    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">Deepseek代码审查的实现原理包含哪三个核心步骤？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">Deepseek的代码审查工作分为三步：1. 模式识别，通过比对数千万个代码样本发现常见错误；2. 上下文理解，分析代码的逻辑关系，如资源是否成对打开/关闭；3. 智能推理，预测代码执行的潜在风险，如变量是否可能为null或出现无限循环。</div>
          </div>
          <div class="card-source">来源: 四、实现原理揭秘</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">针对文档案例中的三种常见代码漏洞，Deepseek分别推荐了哪些修复方案？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">1. 对于空指针漏洞，建议使用Optional处理；2. 对于资源未关闭问题，推荐使用try-with-resources语法；3. 对于SQL注入风险，提示改用PreparedStatement。</div>
          </div>
          <div class="card-source">来源: 三、真实案例：用户管理系统漏洞检测</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">特性</div>
          <div class="card-question">根据文档中的对比数据，与纯人工审查相比，“Deepseek+人工”模式在漏洞发现率和平均耗时方面有何优势？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">特性</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">在漏洞发现率上，“Deepseek+人工”模式达到95%，高于纯人工的78%；在平均耗时上，该模式仅需30分钟，远低于纯人工的4小时。</div>
          </div>
          <div class="card-source">来源: 七、效果对比数据</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">用户如何自定义Deepseek的审查规则？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">用户可以通过配置文件（文档中以YAML为例）来定义审查规则，例如为安全性（security）、性能（performance）、代码风格（style）等不同类别的规则设置不同的严重级别（error, warning, info）。</div>
          </div>
          <div class="card-source">来源: 五、进阶使用技巧</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">模式</div>
          <div class="card-question">如何将Deepseek代码审查集成到CI/CD流程中？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">模式</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">可以通过与CI/CD工具集成来实现，文档中以GitHub Action为例，使用`deepseek-ai/code-review-action`，并可配置`severity_level`（严重性级别）和`fail_on`（触发失败的条件）等参数。</div>
          </div>
          <div class="card-source">来源: 五、进阶使用技巧</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">理论</div>
          <div class="card-question">开发者应该如何看待AI代码审查工具（如Deepseek）给出的建议？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">理论</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">开发者应将AI的审查结果视为“建议”而非“判决”。AI可能会出现误判，最终的决策权仍在开发者手中。</div>
          </div>
          <div class="card-source">来源: 六、开发者常见疑问</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">为修复资源未关闭的漏洞，文档中修正后的代码使用了什么Java语法特性？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">修正后的代码使用了Java的 try-with-resources 语法，将`FileOutputStream`对象的创建放在`try`关键字后的括号内，以实现资源的自动关闭。</div>
          </div>
          <div class="card-source">来源: 三、真实案例：用户管理系统漏洞检测</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">Deepseek的“上下文理解”能力具体体现在哪些方面？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">“上下文理解”能力体现在分析代码的“人际关系”上，例如检查数据库连接是否“成对出现”（即正确打开和关闭），以及敏感操作是否有“保镖”（即相应的权限校验）。</div>
          </div>
          <div class="card-source">来源: 四、实现原理揭秘</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">特性</div>
          <div class="card-question">根据文档数据，与纯人工审查相比，“Deepseek+人工”模式存在哪个指标上的劣势？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">特性</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">根据数据，“Deepseek+人工”模式的误报率为12%，高于纯人工审查的5%。</div>
          </div>
          <div class="card-source">来源: 七、效果对比数据</div>
        </div>
      </div>
    </div>

      </div>
    </body>
    </html>
